#!/bin/sh
#desc: Generate configuration file for remote services
#package:oddiscovery
#type:reserved

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later

if test -z "$1"
then
   echo "Usage: $0 [IP]"
   exit 0
fi

IP=$1


PASSWORD=`cat /etc/opendomo/discovery/password`
SCRIPT=/usr/local/opendomo/discovery/getLocalServices.sh
SSHBATCH="/usr/bin/sshbatch passw $PASSWORD host "

# TODO: maybe another user
$SSHBATCH admin@$IP exec "$SCRIPT"




